#import "NSIndexPath+SRAdditions.h"


@implementation NSIndexPath (SRAdditions)

-(NSIndexPath *)indexPathByAddingLeadingIndex:(NSUInteger)leadingIndex {
    NSIndexPath *indexPath = [NSIndexPath indexPathWithIndex:leadingIndex];
    for (NSUInteger currentIndex = 0; currentIndex < [self length]; currentIndex++)
        indexPath = [indexPath indexPathByAddingIndex:[self indexAtPosition:currentIndex]];
    return indexPath;
}

@end
